<template>
    <div>
        <BreadCrumb></BreadCrumb>
        <div class="category">
            <p>产品类目管理</p>
            <div class="content">
                <el-button type="warning" style="margin: 15px 0;" @click="addOneNodes">增加一级导航类目</el-button>
                <div class="big-tree">
                    <!-- 树组件 -->
                    <BigTree ref="child"></BigTree>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import BigTree from '@/views/product/category/component/bigtree'
export default {
    name: 'category-page',
    components: {
        BigTree
    },
    methods: {
        addOneNodes() {
            this.$refs.child.append({ name: '一级', cid: '' })
        }
    }
}
</script>
<style scoped lang="less">
.category {
    background-color: #fff;
    padding: 10px;

    p {
        height: 40px;
        line-height: 40px;
        padding-left: 5px;
        font-size: 18px;
        font-weight: 500;
        color: #000;
    }

    .content {
        .big-tree {
            margin-top: 10px;
            width: 100%;
        }
    }
}
</style>